/*
	The directives starting with # below ensures that this file is read by the compiler only once
	even if it is #included several times. It is call an "include guard"
*/
#ifndef CATEGORY_H_
#define CATEGORY_H_

#include <string>

using namespace std;

struct Category {
public:
	// constructors
	Category () {}
	Category (int c_id,string c_name):cat_id(c_id),cat_name(c_name){}

	friend std::istream& operator>> (std::istream& in, Category& categ) { return in >> categ.cat_id >> categ.cat_name; }//Ecky
    friend std::ostream& operator<< (std::ostream& os, Category const& categ) { return os << categ.cat_id << " " <<  categ.cat_name; }//Ecky
    // utility functions
	string display() const;
	string get_cat_name()
	{
		return cat_name;
	}
	int get_cat_id()
	{
		return cat_id;
	}
	

	int getId() { return cat_id; }//Ecky

private:
   //constants
     
   // private data
	int cat_id;
	string cat_name;
};


#endif //CATEGORY_H_

